package com.jm.web;

import com.jm.utils.StringBuilderEx;

public class WFPage extends BaseDAPage{
	@Override
	protected void OnLoad() {
		StringBuilderEx sb = new StringBuilderEx();
		sb.Append("$P.setDefaultAction('save');");
		this.RegisterOnReadyScript(SCRIPTRUN_REALTIME, sb.toString());
		
//		sb.Reset();
//		sb.Append("$('#action').val('search');");
//		this.RegisterOnReadyScript(SCRIPTRUN_ONREADY, sb.toString());
		
		//設置表格頁面默認有哪些按鈕默認啟用
		
		this.getBtnDisabledConfig().put("save", false);
		super.OnLoad();
	}
	
	@Override
	public String outputHiddenItem() {
		StringBuilderEx sb = new StringBuilderEx();
		sb.Append(super.outputHiddenItem());
		sb.Append("\r\n<input type=\"hidden\" id=\"pagetype\" name=\"pagetype\" value=\"wfpage\" />");
		sb.Append("\r\n<input type=\"hidden\" id=\"wfinstance\" name=\"wfinstance\" value=\"%1$s\" />",this.getUtils().getForm().gpsv("wfinstance",""));
		sb.Append("\r\n<input type=\"hidden\" id=\"wfstate\" name=\"wfstate\" value=\"%1$s\" />",this.getUtils().getForm().gpsv("wfstate",""));
		sb.Append("\r\n<input type=\"hidden\" id=\"wfstepid\" name=\"wfstepid\" value=\"%1$s\" />",this.getUtils().getForm().gpsv("wfstepid"));
		sb.Append("\r\n<input type=\"hidden\" id=\"wfopstepid\" name=\"wfopstepid\" value=\"%1$s\" />",this.getUtils().getForm().gpsv("wfopstepid"));
		sb.Append("\r\n<input type=\"hidden\" id=\"wfbillno\" name=\"wfbillno\" value=\"%1$s\" />",this.getUtils().getForm().gpsv("wfbillno"));
		sb.Append("\r\n<input type=\"hidden\" id=\"wfdatakeyvalue\" name=\"wfdatakeyvalue\" value=\"%1$s\" />",this.getUtils().getForm().gpsv("wfdatakeyvalue"));
		return sb.toString();
	}
}
